home *** CD-ROM | disk | FTP | other *** search
/ Hot Super Models / Hot Super Models.iso / os2 / misc / viewgif1.zoo / viewgif.doc next >
Text File  |  1990-04-09  |  13KB  |  267 lines

  1. VIEWGIF ver 1.60
  2. ----------------
  3.  
  4. This program allows viewing GIF files under OS/2 Presentation Manager.
  5. It requires a VGA or super VGA card and works best with a 256 color
  6. PM driver (now available for Video 7 VRAM VGA and NEC Graphics Engine).
  7. I don't know how it works with the IBM 8514/A card, but I think the DAC 
  8. registers are also VGA compatible.
  9. For loading a file you can select if you alter the palette registers directly
  10. (VGA only) or let OS/2 do it for you (with dithered colors).
  11.  
  12. This is a true OS/2 PM program, so it does not run under DOS or the DOS 
  13. compatibility box. There are already enough ones for DOS (VPIC, etc.).
  14. The program is public domain and you can spread and copy it as much you want.
  15.  
  16. The program can also read DeluxePaint LBM files, but not LBM files created by 
  17. DP II Enhanced. I don't know the unpacking algorithm on DP II Enhanced. It can 
  18. also handle ZSOft .PCX files until version 3.00.
  19. The Grab menu creates also (unpacked) DeluxePaint II files, in the same way as 
  20. the CAMERA utility does under DOS.
  21.  
  22. The command line switch -c or /c enables direct palette manipulation as a 
  23. default. You can Associate in the File System VIEWGIF -C for all .PCX, .GIF and 
  24. .LBM files.
  25.  
  26. The command line switch -n or /n disables the confirmation on quitting the
  27. program or loading another file when the current bitmap is modified and not
  28. saved yet.
  29.  
  30. The command line switch -4 will load a 256 color picture in a dithered 16 color 
  31. image with the default PM palette.
  32.  
  33. Menu items:
  34. Menu bar(F10 or doubleclick):
  35.       Toggles menubar/titlebar display.
  36.  
  37. File (F): 
  38.       change directory and load picture file (Only .GIF, .PCX  and .LBM
  39.       extensions are enabled). With marking the Direct Palette manipulation
  40.       check box, the program changes the VGA DAC registers directly so the
  41.       other programs in the PM session 'go technicolor'. In this case a task
  42.       switch with Ctrl-Esc or Alt-Esc or popping up the file menu will restore
  43.       the PM default palette and the GIF picture is in false color. This
  44.       works only with pictures with less or equal number of colors than the VGA
  45.       driver. When the checkbox is not marked (or the picture has too many
  46.       colors, e.g. a 256 color GIF on a standard VGA) the closest matching PM
  47.       colors will be used.
  48.  
  49. Scale (S):
  50.       Toggle scaled display within the window and part of picture in window.
  51.       The method of scaling is one of three bitmap compression methods provided
  52.       by PM (keys 1,2 or 3). The redrawing is somewhat slow, it takes a few 
  53.       seconds to redraw a 640x480 picture on a 16 MHz AT. This is because of the 
  54.       GpiBitBlt() function. The 'N' key turns scaling off anyway. Scrolling
  55.       through the picture can be done with the cursor keys (PgUp,PgDn, Home,
  56.       End, Arrows) when scaling is off and the picture does not fit in the
  57.       window. When Save is pressed, the picture will be saved in the scaled way
  58.       when Scale is on, so you can expand or shrink pictures and save them
  59.       again.
  60.  
  61. Palette (P):
  62.       Change colors (only enabled when the picture has not more colors than the 
  63.       display device driver). When the Rewrite check box is enabled, the program 
  64.       rewrites the color table to the GIF header (GIF files only).
  65.       The RGB slides can also be controlled by the enhanced keyboard 
  66.       Red: Insert/Delete, Green: Home/End, Blue: PgUp/PgDn 'grey' keys. Arrow 
  67.       up/down move to previous/next color.
  68.  
  69. Save Method (M):
  70.       Selects the .GIF, DeLuxePaint .LBM or ZSoft .PCX format as save option.
  71.  
  72. Update (U):
  73.       Reads the contents of the main window of VIEWGIF and writes it to a 
  74.       DeluxePaint .LBM or a ZSoft .PCX file, depending on the Save Method menu.
  75.       A Z pressed in the main window forces PCX format and sets the save format 
  76.       to it, and a D forces DeluxePaint format, a G forces GIF format.
  77.       When SCALE is enabled, the picture will be saved with the same picture
  78.       size as the window, so you can save scaled pictures.
  79.       Saving will be done in four bits (16 colors) or eight bits (256 colors) 
  80.       dependant on the current PM driver. When the picture has one color bit 
  81.       (B/W pictures) the file will be saved in one bit when GIF or PCX is 
  82.       selected.
  83.  
  84. Update Window(W):
  85.       Reads a part of the main window of VIEWGIF. Can be selected by the mouse. 
  86.       The initial size of the mouse window is 320x200.
  87.  
  88. Capture(C):
  89.       Captures the entire PM session screen in a file in .GIF, .PCX or .LBM
  90.       format, dependant on the save mode. You can also select a particular area
  91.       of the screen. Initial size = 320x200, but can be expanded. 
  92.       Icons:
  93.       When Icon is selected in the Grab menu (64x64 is best , because it is 
  94.       device independent) you can create icons. After selecting Icon, VIEWGIF 
  95.       asks you for the size. Minimum is 32x32, maximum is 320x256.The Icon
  96.       Editor is a somewhat cumbersome tool, because you can just draw dots and
  97.       little squares and that is all. No circles, nonharizontal and nonvertical
  98.       lines. With Viewgif a GIF or PCX or LBM picture can be shrinked to a
  99.       bitmap of the specified size which can be transferred to the system
  100.       clipboard and then be pasted (paste option) by the Icon Editor provided
  101.       with the OS/2 Programmer's Toolkit. Unfortunately, the colors of IconEdit
  102.       cannot be changed by the bitmap which comes from the clipboard, so the
  103.       colors do not match, because the default colormap of Iconedit does not
  104.       match the system colormap. Therefore I provide a custom icon called
  105.       CUSTOM.ICO with the default color map for 16 colors. You can use any
  106.       paint program for creating icons for PM (I use DeluxePaint) and then read
  107.       the picture with Viewgif and copy the icon into the clipboard. Then you
  108.       must call iconedit with custom.ico and then call paste (in all device
  109.       formats!) and then call Save As (not save) to your own icon file.
  110.  
  111. Custom Size:
  112.       VIEWGIF starts up in full screen mode or in 640x480 size when the PM 
  113.       driver screen size is greater. Pressing F5, F6, F7, F8 or F9 sets the 
  114.       window size to resp. 320x200, 640x400, 640x480, 800x600 and 1024x768. All 
  115.       the sizes work on any screen driver, but int the menu only the screen 
  116.       sizes smaller or equal than the device size are shown. The F4 key lets you 
  117.       set the window to any size (when it fits on the screen). When it doesn't 
  118.       fit on the screen, you can retry it with switching the title bar and menu 
  119.       off (F10 or doubleclick on the client window).
  120.       With the F12 key the current window size (set with Custom size or just 
  121.       with the normal resizing of a window), the current client window size is 
  122.       set to the new bitmap size, so you can cut out parts of a bitmap and then 
  123.       magnify them with the Scale menu. When you save the file now, the new size 
  124.       will be the saved to disk too.
  125.  
  126. Dithering to Monochrome:
  127.  
  128. T:    The picture will be dithered to monochrome with six levels.
  129.  
  130. H:    Halftone dithering. Bright colors will turn white, very dark colors black 
  131.       and medium colors halftone gray.
  132.  
  133. R:    Random dithering. The chance a certain pixel will be white is proportional 
  134.       with the intensity of the color.
  135.  
  136.       In all three ways the intensity is counted as follows:
  137.       (Red*3 + Green*3 + Blue*2)/8. The picture has two colors, white and black.
  138.  
  139. Dithering of 256 color pictures to 16 color(4):
  140.  
  141. With this option a 256 color bitmap can be simulated with using 256 'binary' 
  142. colors consisting of two RGB values. The picture will be dithered in halftone.
  143. When you save the bitmap to a file (GIF/PCX/LBM), it will be saved as a 16 color 
  144. image.
  145.  
  146. Saving and loading of files occurs in background, so this slow action won't 
  147. block you switching to other tasks. Only the VIEWGIF window is locked during 
  148. saving and loading. The same occurs with dithering.
  149.  
  150. Problems:
  151. ---------
  152.  
  153. The source code for unpacking GIFs is a converted Turbo Pascal program for 
  154. unpacking GIFs. I have optimized it somewhat after converting it to C, but it 
  155. can be faster. I am working on it. The reading and writing goes through a 
  156. separate thread, so VIEWGIF won't block the system while loading a picture and 
  157. the user can switch to another program.
  158.  
  159. Because of the awkward color translation of PM, 256 color pictures do not look
  160. very well on a 16 color PM driver.
  161.  
  162. Because of the inability to manipulate the palette registers under the 
  163. current version of PM ( GpiRealizeColorTable() is a dummy function ) this 
  164. program has an IOPL routine to manipulate the DAC registers of the VGA card 
  165. directly. Therefore, to run this program you must set in CONFIG.SYS:
  166.   iopl=yes
  167. or:
  168.   iopl=viewgif
  169.  
  170. Sometimes the entire screen grab does show an entire white bitmap, but grabbing 
  171. once more in the same way does the right thing. I did not yet solve this bug.
  172.  
  173. On EGA cards the direct palette manipulation does not work, but, still the IOPL
  174. statement must be added to CONFIG.SYS.
  175.  
  176. Big bitmaps consume much memory, a 1024x768 bitmap consumes 768 K so multiple
  177. VIEWGIF sessions can slow down overall performance due to swapping. On my PC
  178. with 4 Megs RAM (of which 768 K ramdisk and 512 K diskcache, so net 2816 K) two
  179. VIEWGIFs with 640x480 slows down considerably. Because of loading and saving
  180. performance reasons I translate all bitmaps, even with 16 colors, wo 8 bit
  181. bitmaps, but this consumes twice as much memory.
  182.  
  183. After saving monochrome bitmaps in scaled mode, the screen turns blank. I could
  184. not find the problem, because the bitmap is OK, the saved file and the color
  185. table are all OK. It may be a bug in the way how PM handles bitmaps. When you 
  186. reload the newly written file, it's OK.
  187.  
  188. Trademarks.
  189. ----------
  190.  
  191. DeluxePaint is a registered trademark of Electronic Arts TM.
  192. GIF (Graphic Interchange Format) is a trademark of Compuserve Inc. and the H&R 
  193. Block Corporation.
  194.  
  195. WANTED:
  196. -------
  197.  
  198. The format of OS/2 1.2 Icons, so I can write .ICO files directly to disk with 
  199. Viewgif.
  200.  
  201. Does someone know if DeluxePaint II exists for OS/2 ? The DOS version is very 
  202. good, but I get frustrated with the many 'Not enough memory' messages even with 
  203. 4 MB RAM on my PC.
  204.  
  205. Information about direct Color Palette changing in future versions of OS/2.
  206. This is not possible now. The way I use now is hardware dependant. I have a .DLL 
  207. with direct color palette change (VGA + Super VGA only) with source code which 
  208. you can download from this BBS (PMPAL.ZIP). Viewgif uses the same code, but it's 
  209. embedded in it.
  210.  
  211. Update record:
  212. --------------
  213. VIEWGIF v. 1.2 (20 Jan 90) OS/2 PTK 1.1:
  214.  
  215. Added ZSOft PCX format.
  216. Fixed bug in Update files, now it saved the entire window, even if it's not 
  217. shown entirely.
  218.  
  219. It has been tested on a Tandon 386/16 and Compaq 386/20e with Video 7 VRAM VGA
  220. board (with all available drivers for it) and a Paradise Plus 16 card with
  221. 800x600 PM driver.
  222.  
  223. VIEWGIF v. 1.3 (14 Feb 90) OS/2 PTK 1.1:
  224.  
  225. Loading/saving in separate thread.
  226. Also part of picture save added.
  227. Setting of custom window/bitmap size.
  228.  
  229. VIEWGIF v. 1.4 (11 Mar 90) OS/2 PTK 1.2:
  230.  
  231. Bug with window maximizing (only in OS/2 1.2) fixed.
  232. Bug with custom size of small pictures (segmentation violation) fixed.
  233. Color icon support enabled for transferring pictures to IconEdit.
  234.  
  235. VIEWGIF v. 1.5 (23 Mar 90) OS/2 PTK 1.2:
  236.  
  237. Version 1.4 did not start under OS/2 1.1 because of the color icon. Now VIEWGIF 
  238. loads a B/W icon under OS/2 version 1.1.
  239. Also writing to GIF files supported. Picture/window can be set to any size from 
  240. 32x32 to the screen size.
  241. Monochrome pictures will be written as monochrome pictures to disk when .GIF or 
  242. .PCX format is selected.
  243. Icons also to any size from 32x32 to 320x256.
  244.  
  245. VIEWGIF v. 1.6 (?? Apr 90) OS/2 PTK 1.2:
  246.  
  247. Confirmation on exiting or loading another file when the bitmap has been altered 
  248. by ViewGIF.
  249. Bitmap (16 and 256 color) dithering to monochrome bitmaps.
  250. 256 color bitmap dithering to halftone 16 color bitmaps.
  251.  
  252. VIEWGIF is made by:
  253. Klaas van Ditzhuyzen
  254. DATAD Telecom Products
  255. P.O.Box 371
  256. 3900 AJ Veenendaal Holland
  257. Tel +31 8385 33400
  258. Fax +31 8385 26386
  259.  
  260. For suggestions or bugs, refer to the above address.
  261. You can also leave a message to 
  262.  
  263. Klaas Vanditzhuyzen on the FARGO BBS
  264.  (701) 293-5973  2400 n 8 1 MNP 4.
  265. Martin Vermeer on Magnum (Gilmore) BBS
  266.  (805) 581-1275  2400 n 8 1 MNP 4.
  267.